Depending on the type of product you are using, the definitions of ‘Parameter’, ‘IO Logic’, ‘AxisStatus’, etc. may be different. This example is based on ‘Ezi-SERVO2’, so please apply the appropriate value depending on the product you are using.
Example)
FM_EZISERVO2_PARAM // Parameter enum when using 'Ezi-SERVO2'
FM_EZIMOTIONLINK2_PARAM // Parameter enum when using 'Ezi-MOTIONLINK2'
[EN]
1. Connect a device. 2. Change DAC config. 3. Read DAC config. 4. Close
connection.
[KR]
1. 장치 연결. 2. DAC 설정 변경. 3. DAC 설정 읽기. 4. 연결 해제.
unsigned char byChannel = 0; //Channel = 0
int lDACRange = 0; //AD Range = 0
int lCalbrationHigh = 24000; //Calibration High = 24000
int lCalbrationLow = -1000; //Calibration Low = -1000
int lRecv = 0;
("---------------------------------- \n");
printf// Set DAC Range to 0 (0 ~ 5[V])
if (FAS_SetDACConfig(nBdID, byChannel, DAC_RANGE, lDACRange, &lRecv) != FMM_OK)
{
("Function(FAS_SetDACConfig) was failed.\n");
printf}
// Set DAC Calibration High to 24000
if (FAS_SetDACConfig(nBdID, byChannel, DAC_CALIBRATION_HIGH, lCalbrationHigh, &lRecv) != FMM_OK)
{
("Function(FAS_SetDACConfig) was failed.\n");
printf}
// Set DAC Calibration Low to -1000
if (FAS_SetDACConfig(nBdID, byChannel, DAC_CALIBRATION_LOW, lCalbrationLow, &lRecv) != FMM_OK)
{
("Function(FAS_SetDACConfig) was failed.\n");
printf}
[EN]
You can change DAC configurations using the FAS_SetDACConfig() function.
Meaning of each argument is as follows sequentially: ‘ID number of the
board’, ‘channel number’, ‘parameter type’, ‘parameter value’, ‘pointer
where the value applied to the parameter will be returned’
[KR]
FAS_SetDACConfig() 함수를 사용하여 DAC 관련 설정을 변경할 수 있습니다.
해당 함수의 각 인자는 순차적으로 다음을 의미합니다. ‘해당 보드의
ID번호’, ‘채널 번호’, ‘파라미터 타입’, ‘파라미터 값’, ‘파라미터에 적용된
값이 반환될 포인터’
[EN]
DAC_CONFIG is an enum data type declared to identify DAC parameters.
Meaning of each data type is as follows:
DAC_RANGE: DAC output range DAC_CALIBRATION_HIGH: High Calibration Value DAC_CALIBRATION_LOW: Low Calibration Value
DAC_CONFIG can be found in the header file (MOTION_DEFINE.h).
[KR]
DAC_CONFIG은 DAC 파라미터를 식별하기 위해 선언된 enum 자료형입니다. 각
Type은 다음을 의미합니다.
DAC_RANGE: DAC 출력 범위 DAC_CALIBRATION_HIGH: High Calibration Value DAC_CALIBRATION_LOW: Low Calibration Value
DAC_CONFIG은 헤더파일 (MOTION_DEFINE.h)에서 확인하실 수 있습니다.
unsigned char byChannel = 0; //Channel 0
int lRecv = 0;
("---------------------------------- \n");
printf// Get DAC Range
if (FAS_GetDACConfig(nBdID, byChannel, DAC_RANGE, &lRecv) != FMM_OK)
{
("Function(FAS_GetDACConfig) was failed.\n");
printf}
// Get DAC Calibration High
if (FAS_GetDACConfig(nBdID, byChannel, DAC_CALIBRATION_HIGH, &lRecv) != FMM_OK)
{
("Function(FAS_GetDACConfig) was failed.\n");
printf}
// Get DAC Calibration Low
if (FAS_GetDACConfig(nBdID, byChannel, DAC_CALIBRATION_LOW, &lRecv) != FMM_OK)
{
("Function(FAS_GetDACConfig) was failed.\n");
printf}
[EN]
You can read DAC configurations using the FAS_GetDACConfig() function.
Meaning of each argument is as follows sequentially: ‘ID number of the
board’, ‘channel number’, ‘parameter type’, ‘variable pointer to store
parameter’
[KR]
FAS_GetDACConfig() 함수를 사용하여 DAC 관련 설정을 읽어올 수 있습니다.
해당 함수의 각 인자는 순차적으로 다음을 의미합니다. ‘해당 보드의
ID번호’, ‘채널 번호’, ‘파라미터 타입’, ‘파라미터를 저장할 변수
포인터’
[EN]
1. Please refer to the [01.ConnectionExam] project document for function
descriptions on connecting and disconnecting devices.
[KR]
1. 장치 연결 및 해제에 대한 함수 설명은 [01.ConnectionExam] 프로젝트
문서를 참고하시기 바랍니다.